package com.sanno.account.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sanno.account.entity.Account;
import com.sanno.account.entity.addList;
import com.sanno.account.entity.find1;
import com.sanno.common.entity.SccDrugstore;
import com.sanno.common.entity.SccRole;
import com.sanno.common.entity.SncUserLogin;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AccountDao extends BaseMapper<SncUserLogin> {

//    @Select("select a.Id,a.Token,a.`Name`,a.Phone,a.`Status`,b.Store_name,b.Province,b.City,b.County,e.Role_name " +
//            "from snc_user_login as a,scc_drugstore as b,scc_user_role as c,scc_user_store as d,scc_role as e " +
//            "where (a.Id=d.Stotr_id and d.User_id=c.User_id and d.Stotr_id=b.Store_id and c.Role_id=e.Role_id " +
//            "and a.`Name` like #{name}) ")
    List<Account> getAccount(String name,String province,String city,String county);

    List<SccRole> getRole();

    List<SncUserLogin> findUserLogin(String name,String province,String city,String county);

    List<SccDrugstore> findSccDrugstore(String name,String province,String city,String county);

    int addUser(SncUserLogin sncUserLogin);

    int addUserRole(int id,int roleId);

    int addUserStore(List<addList> list);

    List<find1> find1();

    List<SccDrugstore> find2(List<find1> list);

}
